package indicator;

/**
 * @ClassName DimenstionEnum
 * @Deacription TODO
 * @Author wushumin
 * @Date 2021-06-24 15:08
 * @Version 1.0
 **/
public enum DimenstionEnum {
    GROUP_ID("group_id","groupid"),
    INVITE_USER_ID("invite_user_id","sys_share_distinct_id"),
    ACTIVITY_ID("activity_id","activityid"),
    UTM_SERVICE_TYPE("utm_service_type_id","utmservicetype"),
    UTM_CONTENT_TYPE("utm_content_id","sys_utm_content"),
    UTM_SOURCE_TYPE("utm_source_id","sys_utm_source");


    private String dimensionKey;
    private String dimensionKeyInEvent;

    public String getDimensionKey() {
        return dimensionKey;
    }

    public String getDimensionKeyInEvent() {
        return dimensionKeyInEvent;
    }

    DimenstionEnum(String dimensionKey, String dimensionKeyInEvent) {
        this.dimensionKey = dimensionKey;
        this.dimensionKeyInEvent = dimensionKeyInEvent;
    }
    public static DimenstionEnum ofDimensionKey(String dimensionKey){
        DimenstionEnum[] values = DimenstionEnum.values();
        for (DimenstionEnum value : values) {
            if(value.getDimensionKey().equals(dimensionKey)){
                return value;
            }
        }
        return null;
    }
}
